<? include("/inc/header.html") {} ?>

<div class="col-lg-12">
	<div class="panel panel" style="padding-top:5%;">
		<div class="panel-body pan" style="height: 333px">
			<div class="form-body pal">
				<div>
					<label for="inputUsername" class="col-md-3 control-label">按钮名称<span
						class='require'>*</span> </label>
					<div class="col-md-9">
						<div class="input-icon">
							<input id="name" type="text" class="form-control"  />
						</div>
					</div>
				</div>
				<div>
					<label for="inputUsername" class="col-md-3 control-label">按钮标题
						<span class='require'>*</span> </label>
					<div class="col-md-9">
						<div class="input-icon">
							<input id="title" type="text" class="form-control" />
						</div>
					</div>
				</div>
				<div>
					<label for="inputUsername" class="col-md-3 control-label">按钮CODE
						<span class='require'>*</span> </label>
					<div class="col-md-9">
						<div class="input-icon">
							<input id="code" type="text" class="form-control" />
						</div>
					</div>
				</div>
				<input id="menuld" type="hidden" class="form-control" />
				<div>
					<label for="inputUsername" class="col-md-3 control-label">状态
						<span class='require'>*</span> </label>
					<div class="col-md-9">
						<div class="input-icon">
							<select id="status" class="form-control">
								<option value="0">启用</option>
								<option value="1">禁用</option>
							</select>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	var menuId = window.parent.getzTreeid();
	 $("#menuld").val(menuId);
	function save() {
		$.ajax({
			type : "post",
			data : {
				"menuld":menuId,
				"name":$("#name").val(),
				"title":$("#title").val(),
				"code":$("#code").val(),
				"status":$("#status").val()
			},
			url : "knowledgeEditDataAddMentButton.do",
			dataType : "json",
			beforeSend : function(XMLHttpRequest) {
			},
			success : function(data){
				var index = parent.layer.getFrameIndex(window.name);
				 window.parent.queryMenuButton();
           		 parent.layer.msg('添加成功!'); 
           		 parent.layer.close(index); 
			},
		}); 
    } 
</script>
